package com.eregg.learn.netty.demo.pipeline.handler;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

public class ServerInHandlerC extends ChannelInboundHandlerAdapter {
    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
        System.out.println("ServerInHandlerC");
        //super.channelRead(ctx, msg);

        ByteBuf buffer = (ByteBuf) msg;
        buffer.writeBytes(" -> inboundC".getBytes());


        ctx.channel().writeAndFlush(buffer);
    }
}
